////////////////////////////////////////
//	File Header
//	Author: Stephen Ringer | stephen.ringer@gmail.com
//	File: SAGATimer.h
//
////////////////////////////////////////

////////////////////////////////////////
//	Class Name: SAGATimer
class SAGATimer 
{
	LONGLONG m_nCur_time;         // current time
	LONGLONG m_nPerf_cnt;         // performance timer frequency
	bool     m_blnPerf_flag;      // flag for timer to use
	LONGLONG m_nLast_time;	      // time of previous frame
	float    m_fTime_elapsed;     // time elapsed since previous frame
	float    m_fTime_scale;       // scaling factor for time
	UCHAR    m_nHH;               // clock time hours
	UCHAR    m_nMM;               // clock time minutes
	UCHAR    m_nSS;               // clock time seconds
	float    m_fClock;            // sum up milliseconds
	float    m_fFaktor;           // slowmo or speedup
	float    m_fStamp;            // unique timestamp
public:
	SAGATimer(unsigned char nHH, unsigned char nMM);
	~SAGATimer();

	void  Update();
	void  SetClock(unsigned char nHH, unsigned char nMM);
	char* GetClock(unsigned char *nHH, unsigned char *nMM, char *pChar); 
	float GetTimeStamp()      { return m_fStamp; }
	float GetElapsed()        { return (m_fTime_elapsed*m_fFaktor); }
	float GetFPS()            { return (1/m_fTime_elapsed); }
	float GetScale()          { return m_fFaktor; }
	void  SetScale(float fFaktor) { m_fFaktor = fFaktor; }
};
//
////////////////////////////////////////